package com.goods.business.converter;

import com.goods.common.model.business.InStock;
import com.goods.common.model.business.Supplier;
import com.goods.common.vo.business.InStockVO;
import com.goods.common.vo.business.SupplierVO;
import org.springframework.beans.BeanUtils;
import org.springframework.util.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**********************
 *
 *@Author 闫星忠
 *@Time 2021/12/16  16:36
 *
 */
public class InStockConverter {


    public static List<InStockVO> converterToInStockVOList(List<InStock> inStocks){
        List<InStockVO> inStockVOS = new ArrayList<>();
        if (!CollectionUtils.isEmpty(inStocks)){
            for (InStock inStock : inStocks){
                InStockVO inStockVO = new InStockVO();
                BeanUtils.copyProperties(inStock,inStockVO);
                inStockVOS.add(inStockVO);
            }
        }
        return inStockVOS;
    }
}
